layui.use(['table', 'laytpl', 'layer'], function() {
	var $ = layui.$;
	var url = location.href;
	var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
	var id = paraString[0].substring(paraString[0].indexOf("=") + 1, paraString[0].length);
	var type = paraString[1].substring(paraString[1].indexOf("=") + 1, paraString[1].length);
	if(type == "edit") {
      announcemsg();
	}
	function announcemsg() {
		$.ajax({
			type: "post",
			url: "/announce/msg",
			async: true,
			data:{
				id:id
			},
			success:function(data){
				var ret=JSON.parse(data);
				$(".layui-input").val(ret.announcename);
				$(".layui-textarea").html(ret.announcecontxt);
				
			}
		});
	}
});